package com.xiaobange.entity;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 客户信息表
 * @TableName client_user
 */
@Data
public class ClientUser implements Serializable {
    /**
     * 顾客ID
     */
    private Integer cId;

    /**
     * 顾客手机号
     */
    private String phoneNum;

    /**
     * 用户名称
     */
    private String cName;

    /**
     * 性别
     */
    private String cGender;

    /**
     * 会员等级
     */
    private String vipGrade;

    /**
     * 注册时间
     */
    private Date createTable;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ClientUser other = (ClientUser) that;
        return (this.getCId() == null ? other.getCId() == null : this.getCId().equals(other.getCId()))
            && (this.getPhoneNum() == null ? other.getPhoneNum() == null : this.getPhoneNum().equals(other.getPhoneNum()))
            && (this.getCName() == null ? other.getCName() == null : this.getCName().equals(other.getCName()))
            && (this.getCGender() == null ? other.getCGender() == null : this.getCGender().equals(other.getCGender()))
            && (this.getVipGrade() == null ? other.getVipGrade() == null : this.getVipGrade().equals(other.getVipGrade()))
            && (this.getCreateTable() == null ? other.getCreateTable() == null : this.getCreateTable().equals(other.getCreateTable()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCId() == null) ? 0 : getCId().hashCode());
        result = prime * result + ((getPhoneNum() == null) ? 0 : getPhoneNum().hashCode());
        result = prime * result + ((getCName() == null) ? 0 : getCName().hashCode());
        result = prime * result + ((getCGender() == null) ? 0 : getCGender().hashCode());
        result = prime * result + ((getVipGrade() == null) ? 0 : getVipGrade().hashCode());
        result = prime * result + ((getCreateTable() == null) ? 0 : getCreateTable().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cId=").append(cId);
        sb.append(", phoneNum=").append(phoneNum);
        sb.append(", cName=").append(cName);
        sb.append(", cGender=").append(cGender);
        sb.append(", vipGrade=").append(vipGrade);
        sb.append(", createTable=").append(createTable);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}